package qianting.news.user.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import qianting.news.apis.models.user.dtos.UserRelationDto;
import qianting.news.common.entity.State;
import qianting.news.user.service.ApUserRelationService;

@RestController
@RequestMapping("/")
public class UserRelationController {

    @Autowired
    private ApUserRelationService apUserRelationService;
  
    @PostMapping("/follow")
    public State follow(@RequestBody UserRelationDto dto){
        return apUserRelationService.follow(dto);
    }
}